/**
 * 
 */
package com.esiag.isidis.fi.pdsteam.main;

import com.esiag.isidis.fi.pdsteam.entity.Machine;
import com.esiag.isidis.fi.pdsteam.service.ObserverReceiver;
import com.esiag.isidis.fi.pdsteam.service.ServerReceiver;

/**
 * @author Idrissi
 * 
 */
public class Main {

	/**
	 * 
	 */
	private void start(Machine machine) {
		// receive data
		ServerReceiver serverReceiver = new ServerReceiver();
		ObserverReceiver observerReceiver = new ObserverReceiver();
		serverReceiver.addObserver(observerReceiver);
		serverReceiver.startReceive(machine);
	}

	public Main() {

		Machine machine = new Machine("localhost", 12345);
		start(machine);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		new Main();

	}

}
